import { Component } from 'react'
// import {useNavigate} from 'react-router-dom'
// function Onec(){
//     let o = useNavigate()

//     return (
//         <div className='box'>
//             <span onClick={()=>{
//                 o(-1)
//             }}>OOO</span>
//         </div>
//     )
// }
// export default Onec



import { useParams, useLocation, useNavigate } from "react-router-dom"

function withRouter(Component) {
  return (props) => (
    <Component
      {...props}
      params={useParams()}
      location={useLocation()}
      navigate={useNavigate()}
    />
  );
}

class Onec extends Component {
    constructor() {
        super()
        this.state = {

        }
    }
    render() {
        return (
            <div className='box'>
                <span onClick={()=>{
                    this.props.navigate(-1)
                }}>Oencv</span>
            </div>
        )
    }
}
export default withRouter(Onec)
